<?php
namespace App\Components\Twig;

use App\Components\Twig\TwigRuntimeExtension;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

class TwigExtension extends AbstractExtension
{
    public function getFunctions(): array
    {
        return [
            new TwigFunction('url', [TwigRuntimeExtension::class, 'url']),
            new TwigFunction('csrf', [TwigRuntimeExtension::class, 'csrf']),
            new TwigFunction('menu', [TwigRuntimeExtension::class, 'menu']),
            new TwigFunction('config', [TwigRuntimeExtension::class, 'config']),
            new TwigFunction('view', [TwigRuntimeExtension::class, 'view']),
            new TwigFunction('input_img', [TwigRuntimeExtension::class, 'inputImg']),
        ];
    }
}
